#include "Message.h"

Message::Message( void ) {
	// Zero out all data
}

Message::Message( const char* f, char* d ) {
	// Set Flag, and Data
	// Set bytes and datalength
}

bool Message::release( int sock ) {
	// Combine flag and data, send to socket
	// Return result of send.
}

int Message::receive( int sock ) {
	
	// Allocate size for the data coming in.
	// Do error checking
	// Set flag and data
}

void Message::setFlag( const char* f, int length ) {
	// Put length number of characters from f into flag
}

void Message::setData( char* d, int length ) {
	// Set data from d using length
}

char* Message::getFlag( void ) {
	return flag;
}

char* Message::getData( void ) {
	return data;
}

int Message::getBytes( void ) {
	return bytes;
}

int Message::getSocket( void ) {
	return socket;
}

int Message::setBytes( void ) {
	return bytes = FLAG_SIZE + strlen( data );
}

int Message::setBytes( int b ) {
	return bytes = b;
}

int Message::getDataLength( void ) {
	return dataLength;
}

int Message::setDataLength( void ) {
	return dataLength = strlen( data );
}